//
//  TestProblem1030.swift
//  LeetCodeTests
//
//  Created by 毕武侠 on 2023/6/23.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

final class TestProblem1030: XCTestCase {

    var problem = Problem1030()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem1030_Case1() throws {
        XCTAssertEqual(problem.allCellsDistOrder(1, 2, 0, 0), [[0,0], [0,1]])
    }
    
    func testProblem1030_Case2() throws {
        XCTAssertEqual(problem.allCellsDistOrder(2, 2, 0, 1), [[0,1],[1,1],[0,0],[1,0]])
    }
    
    func testProblem1030_Case3() throws {
        XCTAssertEqual(problem.allCellsDistOrder(2,3,1,2), [[1,2],[0,2],[1,1],[0,1],[1,0],[0,0]])
    }
    
    func testProblem1030_2_Case1() throws {
        XCTAssertEqual(problem.allCellsDistOrder2(1, 2, 0, 0), [[0,0], [0,1]])
    }
    
    func testProblem1030_2_Case2() throws {
        XCTAssertEqual(problem.allCellsDistOrder2(2, 2, 0, 1), [[0,1],[0,0],[1,1],[1,0]])
    }
    
    func testProblem1030_2_Case3() throws {
        XCTAssertEqual(problem.allCellsDistOrder2(2,3,1,2), [[1,2],[0,2],[1,1],[0,1],[1,0],[0,0]])
    }
}
